import threading
import time

def print_numbers():
    while True:
        for i in range(1, 6):
            time.sleep(1)
            print(i)

# 创建线程
thread1 = threading.Thread(target=print_numbers)
thread2 = threading.Thread(target=print_numbers)

# 启动线程
thread1.start()
thread2.start()

# 等待线程完成
thread1.join()
thread2.join()

print("线程执行完毕")

